from app import app, scheduler, models
from pyrogram import idle

from app.scripts import (
    tools,
    zhuque,
    redleaves,
    ptvicomo,
    agsv,
)


async def main():
    await app.start()
    await models.create_all()
    await idle()
    await app.stop()


if __name__ == "__main__":
    app.run(main())

if __name__ == "__main__":
    scheduler.start()
    app.run()
